<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title></title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">

<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
<script type="text/javascript">
	$(function() {
		$("#ch_checkall,#top_ch_checkall").click(function() {
			if (this.checked) {
				$("input[name=ck_id]").attr("checked", "checked");
			} else {
				$("input[name=ck_id]").removeAttr("checked");
			}
		});

		$("table tr").mouseover(function() {
			$(this).css("background", "#D3EAEF");
			$(this).siblings().css("background", "white");
		});
	});
</script>

<link rel="stylesheet" type="text/css" href="css/maintable.css"></link>
</head>

<body>
	<div class="div_title">
		<div class="div_titlename">
			<img src="images/san_jiao.gif"><span>管理人员基本信息列表</span>
		</div>
	</div>
		
		
		<form action="RoleServlet.do?flog=listadmin" name="form1" method="post">

		<table class="main_table">
			<tr>
				<th><input type="checkbox" id="ch_checkall" /></th>
				<th>账号</th>
				<th>状态</th>
				<th>用户角色</th>
				<th>最后更新日期</th>
				<th>操作</th>
			</tr>
			</tr>
			<c:forEach var="admin" items="${adminList}">
				<tr>
					<td><input type="checkbox" name="ck_id" value="69" /></td>

					<td>${admin.adminName}</td>
					<td>${admin.state}</td>
					<td>${admin.roleName}</td>
					<td>${admin.editDate}</td>
					<td><a href="RoleServlet.do?flog=changeAdmin&roleId=${admin.roleId }&roleAdminName=${admin.adminName}">角色分配</a></td>
				</tr>

			</c:forEach>
		</table>
		<div class="div_page">
			<div class="div_page_left">
				共有 <label> ${page.rowCount}</label> 条记录，当前第 <label>${page.pageIndex}</label>
				页，共 <label>${page.pageCount }</label> 页
			</div>
			<div class="div_page_right">

				<c:choose>
					<c:when test="${page.hasPre }">
						<a href="RoleServlet.do?flog=listadmin&pageIndex=1">首页</a>
						<a
							href="RoleServlet.do?flog=listadmin&pageIndex=${page.pageIndex-1}">前一页</a>
					</c:when>
					<c:otherwise>
	首页
	前一页
	</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${page.hasNext }">
						<a
							href="RoleServlet.do?flog=listadmin&pageIndex=${page.pageIndex+1 }">后一页</a>
						<a
							href="RoleServlet.do?flog=listadmin&pageIndex=${page.pageCount }">尾页</a>
					</c:when>
					<c:otherwise>
		后一页
		尾页
		</c:otherwise>
				</c:choose>
				<input type="submit" value="转" ><input name="pageIndex"
					value="${ page.pageIndex}">页
			</div>

		</div>
	</form>
</body>
</html>
